FileList
Author: David Li
Execution cost: less than 418 gas
Deployment cost: less than 382200 gas
Combined cost: less than 382618 gas
Events
fileAdded(uint256,string,bytes32)
Execution cost: No bound available
Params:
- fileid of type
uint256
- ipfshash of type
string
- _filename of type
bytes32
tagsAdded(bytes32[5])
Execution cost: No bound available
Params:
- tags of type
bytes32[5]
Methods
addFile(string,bytes32,bytes32[5])
updates mappings todos and lastIds
Add a file to the list
Execution cost: No bound available
Params:
-
ipfshash of type
string
an ipfshash returned after an image is finished uploaded
-
_filename of type
bytes32
name of file as a bytes32 as filenames should be short
-
tags of type
bytes32[5]
array of bytes32 used for sorting/searching files (e,g. blockchain, school, textbook)
files(address,uint256)
Execution cost: No bound available
Attributes: constant
Params:
- param_0 of type
address
- param_1 of type
uint256
Returns:
- id of type
uint256
- ipfshash of type
string
- filename of type
bytes32
- owner of type
address
- timestamp of type
uint256
getFileTags(address,uint256)
return the tags for a specific file
Execution cost: No bound available
Attributes: constant
Params:
-
owner of type
address
--- address of person who uploaded the file
-
_index of type
uint256
--- the file desired, (first file uploaded, second , etc ...)
Returns:
- output_0 of type
bytes32[5]
lastIds(address)
Execution cost: less than 575 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- output_0 of type
uint256
maxAmountOfFiles()
Execution cost: less than 272 gas
Attributes: constant
Returns:
- output_0 of type
uint256